<?php

namespace app\portal\validate;

use think\Validate;

class HouseValidate extends Validate
{
    protected $rule = [
        'title' => 'require',
        'thumb' => 'require',
        'keywords' => 'require',
        'price' => 'require',
        'structure_type' => 'require',
        'acreage' => 'require',
        'univalent' => 'require',
        'years' => 'require',
        'decoration_type' => 'require',
        'direction' => 'require',
        'property_year' => 'require',
        'estate_name' => 'require',
        'floor' => 'require',
        'floorall' => 'require',
        'floor_type' => 'require',
        'address' => 'require',
        'position' => 'require',
        'content' => 'require',
        'reward' => 'require',
        'contact' => 'require',
        'sell_type' => 'require',
    ];
    protected $message = [
        'title.require' => '请输入标题！',
        'thumb.require' => '请添加缩略图！',
        'keywords.require' => '请设置关键词！',
        'price.require' => '请填写房源售价！',
        'structure_type.require' => '请选择户型！',
        'acreage.require' => '请填写面积！',
        'univalent.require' => '请填写每平米价格！',
        'years.require' => '请填写购买年份！',
        'property_year.require' => '请填写产权信息！',
        'decoration_type.require' => '请选择装修类型！',
        'direction.require' => '请选择房源朝向！',
        'estate_name.require' => '请填写小区名称！',
        'floor.require' => '请填写房源所在楼层！',
        'floorall.require' => '请填写房源总楼层！',
        'floor_type.require' => '请选择楼层类型！',
        'address.require' => '请填写房源地址！',
        'position.require' => '请填写房源经纬度坐标！',
        'content.require' => '请填写房源优势！',
        'reward.require' => '请填奖励说明！',
        'sell_type.require' => '请选择出售情况！',
    ];

    protected $scene = [
//        'add'  => ['user_login,user_pass,user_email'],
//        'edit' => ['user_login,user_email'],
    ];
}
